/**
 * 
 */
package com.hczoop.utils.designPattern.templateMethod.flow;

import java.util.List;

import com.hczoop.utils.designPattern.templateMethod.vo.Car;


/**
 * @author hc360
 *
 */
public abstract class YearCheck {

	public boolean isPass = true;//表示检测结果
	public abstract List<Car> getCars();
	public abstract boolean fire();//打火
	public abstract boolean pressureCheck();//压力检测
	public abstract boolean airCheck();//尾气检测
	public abstract boolean chuiziCheck();//安全锤检测
	public abstract boolean backCar();//还车
	/**
	 * 
	* @Description: TODO 
	* @param  检测汽车
	* @return
	* @date 2015年8月24日 下午6:00:33 
	* @author hc360
	* @return boolean
	 */
	public  boolean checkCar(Car car){
		//1、点火起步
		fire();
		//2、压力检测
		pressureCheck();
		//3、尾气检测
		airCheck();
		//4、安全锤检测
		chuiziCheck();
		//5、还车
		backCar();
		isPass = getResult();
		return isPass;
	}
	public boolean isPass() {
		return isPass;
	}
	public  boolean getResult(){
		return isPass;
	}
	public void setPass(boolean isPass) {
		this.isPass = isPass;
	}
	
	
}
